<template>
  <div>
    <h1>{{ msg }}</h1>

    <button @click="btn">逆转世界</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      msg: "Hello, World",
    };
  },
  methods: {
    btn() {
      //   this.msg = this.msg.split("").reverse().join("");
      this.msg = [...this.msg].reverse().join("");
    },
  },
};
</script>

<style></style>
